/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.posplus.losspreventiondataimporter.svt;

import com.posplus.lossprevention.mapping.Departments;
import com.posplus.strack.mapping.Department;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

/**
 *
 * @author ScottW
 */
public class DepartmentsMapper {
    
    public static List<Departments> svtTolp(List<Department> svtDepartments){
        List<Departments> lpDepartments = new ArrayList<Departments>();
        
        Iterator<Department> iter = svtDepartments.iterator();
        while(iter.hasNext()){
            Department svtDept = iter.next();
            Departments lpDept = new Departments(svtDept.getId().getDeptNo().intValue(), svtDept.getId().getDeptSub().intValue(), svtDept.getDeptName(), null, null);
            lpDepartments.add(lpDept);
        }
        
        return lpDepartments;
    }
}
